package coreqto

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

type BasePageQto struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Key        string `json:"key"                              gorm:"column:key;comment:关键字;"`
	Page       int    `json:"page"  validate:"gte=1"    gorm:"column:page;comment:请求页;"`
	PageSize   int    `json:"pageSize" validate:"gte=1"    gorm:"column:page_size;comment:页数量;"`
	SortFields string `json:"sortFields"                       gorm:"column:sort_fields;comment:排序;"`
}

/**
*注册类型
 */
func BasePageQtoInit() {
	var mcls = &BasePageQto{}
	var m = &corestruct.MyClass{
		Name:     "带分页Dto",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddQto(m)
}
